#include <bits/stdc++.h>
using namespace std;
class Solution {
public:
  int singleNumber(vector<int> &nums) {
    int res = 0;
    for (auto num : nums)
      res ^= num;
    return res;
  }
};
